# -*- coding:utf8 -*- #
# -----------------------------------------------------------------------------------
# ProjectName:  property-ui-auto-test
# FileName:     manual_payment_project.py
# Author  :
# Datetime:     2022/9/27 18:17
# Description：
# -----------------------------------------------------------------------------------
from time import sleep

from page.login_page import LoginPage


class ManualPaymentProject(LoginPage):
    def manual_payment_setup(self):
        # 点击展开
        self.click('//*[@id="app"]/section/section/aside/div/img')
        sleep(0.5)
        # 点击客服收费
        self.click('//*[@id="app"]/section/section/aside/div/div/ul/li[3]/div')
        sleep(0.3)
        # 点击虚拟电表
        self.click('//*[@id="app"]/section/section/aside/div/div/ul/li[3]/ul/li[1]/ul/li')

    def manual_payment_charge(self,dbNo=102021031603,price=10,remark="自动化测试"):
        self.manual_payment_setup()
        self.send_keys('//*[@id="app"]/section/section/main/section/section/section/main/form/div[1]/div/div/input',dbNo)
        self.click('//*[@id="app"]/section/section/main/section/section/section/main/form/div[6]/label')
        sleep(1)
        self.send_keys('//*[@id="app"]/section/section/main/section/section/section/main/form/div[6]/div/div[1]/input',price)
        self.send_keys('//*[@id="app"]/section/section/main/section/section/section/main/form/div[7]/div/div/input',remark)
        self.click('//*[@id="app"]/section/section/main/section/section/section/main/form/div[8]/div/div/button[1]')





if __name__ == '__main__':
    mpp = ManualPaymentProject()
    mpp.login()
    mpp.manual_payment_charge()